﻿<UserControl x:Class="StudentModule.Views.NhapThongTinView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:prism="http://www.codeplex.com/prism"  
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:inf_int="clr-namespace:Infrastructure.InteractionRequests;assembly=Infrastructure"
             xmlns:helper="clr-namespace:Infrastructure.Helpers;assembly=Infrastructure"
             xmlns:local="clr-namespace:StudentModule.Views"
             mc:Ignorable="d" 
             d:DesignHeight="1000" d:DesignWidth="800" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             x:Name="root">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Infrastructure;component/Themes/CommonTemplates.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <helper:SuccessConverter x:Key="SuccessConverter" />
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel>
            <TextBlock Margin="40,10,0,0" Text="Thông tin sinh viên" Grid.ColumnSpan="2"
                       FontWeight="Bold" Foreground="#FF7A7A7A" HorizontalAlignment="Left"  FontFamily="Segoe UI" FontSize="16" />
            <Rectangle Fill="#FFD6D6D6" Height="1" Margin="0,10 0,15" />
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <telerik:RadButton Width="38" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                   Command="{Binding SaveCommand}">
                    <telerik:RadButton.Content>
                        <Image Source="/Infrastructure;component/Images/MiniIcon/save_as.png" Height="14" Width="14"/>
                    </telerik:RadButton.Content>
                </telerik:RadButton>
                <TextBlock Text="Lưu danh sách" Foreground="#FF060606" FontSize="12" Margin="40 3 14 3" />
            </StackPanel>
        </StackPanel>
        <ScrollViewer Grid.Row="1" Margin="5" HorizontalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <StackPanel DataContext="{Binding SinhVien, Mode=TwoWay}" HorizontalAlignment="Center">
                <StackPanel Orientation="Horizontal" >
                    <TextBlock Text="               Họ và tên:   " Margin="0,7,0,0" />
                    <TextBlock Style="{StaticResource TextBlockStyle}" Margin="0,7,0,0" >
                        <TextBlock.Text>
                            <MultiBinding StringFormat="{}{0} {1}">
                                <Binding Path="HoSinhVien" />
                                <Binding Path="TenSinhVien" />
                            </MultiBinding>
                        </TextBlock.Text>
                    </TextBlock>
                    <TextBlock Text="         Mã số sinh viên:   " Margin="0,7,0,0" />
                    <TextBlock Text="{Binding MaSinhVien}"  Style="{StaticResource TextBlockStyle}" Margin="0,7,0,0" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Ngày sinh:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding NgaySinh,Mode=TwoWay}" Width="130" Margin="4"/>
                    <TextBlock Text="       Giới tính:" Margin="0,7,0,0" />
                    <telerik:RadRadioButton Width="60" Margin="4"
                        IsChecked="{Binding Path=GioiTinh, Mode=TwoWay, Converter={StaticResource SuccessConverter}, ConverterParameter=true}"
						HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="Nam" />
                    <telerik:RadRadioButton Width="60" Margin="4" IsChecked="{Binding Path=GioiTinh, Mode=TwoWay, Converter={StaticResource SuccessConverter}, ConverterParameter=false}"
						HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="Nữ" />
                    <TextBlock Text="       Nơi sinh:   " Margin="0,7,0,0" />
                    <TextBox Text="{Binding NoiSinh,Mode=TwoWay}" Width="180" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <!--<TextBlock Text="               Ngành:     " Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox1" Margin="4" Width="170"
                                 ItemsSource="{Binding DataContext.DonViList,ElementName=root}"
                                 SelectedValue="{Binding Path=DonViID, Mode=TwoWay}" 
                                                                     SelectedItem="{Binding DataContext.CurrentDonVi,ElementName=root, Mode=TwoWay}"
                                 SelectedValuePath="ID"
                                 DisplayMemberPath="TenGoi" />-->
                    <TextBlock Text="               Dân tộc:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox2" Margin="4" Width="200"
                                 ItemsSource="{Binding DataContext.DanTocList, TargetNullValue='Chưa xác định',ElementName=root}"
                                 SelectedValue="{Binding Path=DanTocID, Mode=TwoWay}" 
                                 SelectedValuePath="ID"
                                 DisplayMemberPath="TenGoi" />
                    <TextBlock Text="                                                Tôn giáo:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox3" Margin="4" Width="200"
                                 ItemsSource="{Binding DataContext.TonGiaoList, TargetNullValue='Chưa xác định',ElementName=root}"
                                 SelectedValue="{Binding Path=TonGiaoID, Mode=TwoWay}" 
                                 SelectedValuePath="ID"
                                 DisplayMemberPath="TenGoi" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Số CMND:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding CMND.SoCMND,Mode=TwoWay}" Width="170" Margin="4"/>
                    <TextBlock Text="       Ngày cấp:" Margin="0,7,0,0" />
                    <telerik:RadDatePicker SelectedDate="{Binding CMND.NgayCap,Mode=TwoWay}" Margin="4" Width="140"/>
                    <TextBlock Text="        Nơi cấp: " Margin="0,7,0,0" />
                    <TextBox Text="{Binding CMND.NoiCap,Mode=TwoWay}" Width="130" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Tên trường tốt nghiệp trung học: " Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuaTrinhHocPhoThong.TotNghiepPhoThong.TotnghiepTruong,Mode=TwoWay}" Width="200" Margin="4"/>
                    <TextBlock Text="           Xếp loại tốt nghiệp: " Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuaTrinhHocPhoThong.TotNghiepPhoThong.XepLoaiTotNghiep,Mode=TwoWay}" Width="130" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Số hiệu bằng tốt nghiệp: " Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuaTrinhHocPhoThong.TotNghiepPhoThong.SoVaoSo,Mode=TwoWay}" Width="200" Margin="4"/>
                    <TextBlock Text="                              Năm tốt nghiệp: " Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuaTrinhHocPhoThong.TotNghiepPhoThong.NamTotNghiep,Mode=TwoWay}" Width="130" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Địa chỉ thường trú:             -Số nhà:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiThuongTru.SoNha,Mode=TwoWay}" Width="150" Margin="4"/>
                    <TextBlock Text="                  -Phường xã:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiThuongTru.PhuongXaThiTran,Mode=TwoWay}" Width="195" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="                                                 -Tỉnh thành:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox4" Margin="4" Width="180"
                                                                         ItemsSource="{Binding DataContext.DVHCCap1List,ElementName=root}"
                                                                         SelectedValue="{Binding Path=LienLac.DiaChiThuongTru.TinhThanhID, Mode=TwoWay}" 
                                                                         SelectedItem="{Binding DataContext.ThuongTru,ElementName=root, Mode=TwoWay}"
                                                                         SelectedValuePath="ID"
                                                                         DisplayMemberPath="Ten" />
                    <TextBlock Text="              -Quận huyện:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox5" Margin="4" Width="180"
                                                                         ItemsSource="{Binding DataContext.DVHCCap2ThuongTruList,ElementName=root}"
                                                                         SelectedValue="{Binding Path=LienLac.DiaChiThuongTru.QuanHuyenID, Mode=TwoWay}" 
                                                                         
                                                                         SelectedValuePath="ID"
                                                                         DisplayMemberPath="Ten" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Điện thoại gia đình:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiThuongTru.SoDienThoai,Mode=TwoWay}" Width="110" Margin="4"/>
                    <TextBlock Text="       Di dộng:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiLienLac.DienThoaiCaNhan,Mode=TwoWay}" Width="110" Margin="4"/>
                    <TextBlock Text="       Email:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding EmailCaNhan,Mode=TwoWay}" Width="200" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Địa chỉ tạm trú:                 -Số nhà:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiTamTru.SoNha,Mode=TwoWay}" Width="150" Margin="4"/>
                    <TextBlock Text="                  -Phường xã:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiTamTru.PhuongXaThiTran,Mode=TwoWay}" Width="200" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="                                                 -Tỉnh thành:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox6" Margin="4" Width="180"
                                                                         ItemsSource="{Binding DataContext.DVHCCap1List,ElementName=root}"
                                                                         SelectedValue="{Binding Path=LienLac.DiaChiTamTru.TinhThanhID, Mode=TwoWay}" 
                                                                         SelectedItem="{Binding DataContext.TamTru,ElementName=root, Mode=TwoWay}"
                                                                         SelectedValuePath="ID"
                                                                         DisplayMemberPath="Ten" />
                    <TextBlock Text="              -Quận huyện:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox7" Margin="4" Width="180"
                                                                         ItemsSource="{Binding DataContext.DVHCCap2TamTruList,ElementName=root}"
                                                                         SelectedValue="{Binding Path=LienLac.DiaChiTamTru.QuanHuyenID, Mode=TwoWay}" 
                                                                         
                                                                         SelectedValuePath="ID"
                                                                         DisplayMemberPath="Ten" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Địa chỉ liên lạc:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiLienLac.DiaChi,Mode=TwoWay}" Width="300" Margin="4"/>
                    <TextBlock Text="               Điện thoại:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding LienLac.DiaChiLienLac.SoDienThoai,Mode=TwoWay}" Width="169" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Đối tượng chính sách:" Margin="0,7,0,0" />
                    <telerik:RadComboBox Name="radComboBox8" Margin="4" Width="200"
                                                                     ItemsSource="{Binding DataContext.ChinhSachList, TargetNullValue='Không có',ElementName=root}"
                                                                     SelectedValue="{Binding Path=ChinhSachID, Mode=TwoWay}" 
                                                                     SelectedValuePath="ID"
                                                                     DisplayMemberPath="TenChinhSach" />
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Ngày vào đoàn:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDoan.NgayVaoDoan,Mode=TwoWay}" Width="200" Margin="4"/>
                    <TextBlock Text="                             Nơi vào đoàn:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDoan.NoiVaoDoan,Mode=TwoWay}" Width="200" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Chức vụ đoàn vào cao nhất đã qua:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDoan.ChucVuDoanCaoNhat,Mode=TwoWay}" Width="250" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Ngày vào Đảng dự bị:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDang.NgayVaoDangDuBi,Mode=TwoWay}" Width="100" Margin="4"/>
                    <TextBlock Text="     Chính thức:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDang.NgayVaoDangChinhThuc,Mode=TwoWay}" Width="100" Margin="4"/>
                    <TextBlock Text="        Nơi vào Đảng:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDang.NoiVaoDang,Mode=TwoWay}" Width="150" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Năng khiếu:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDoan.NangKhieu,Mode=TwoWay}" Width="230" Margin="4"/>
                    <TextBlock Text="                 Nguyện vọng:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding SinhHoatDoan.NguyenVong,Mode=TwoWay}" Width="230" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Họ tên cha:" Margin="0,7,0,0" FontWeight="Bold" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.HoTen,Mode=TwoWay}" Width="250" Margin="4"/>
                    <TextBlock Text="                                Năm sinh:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.NamSinh,Mode=TwoWay}" Width="180" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Hộ khẩu thường trú:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.HoKhauThuongTru,Mode=TwoWay}" Width="553" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Nghề nghiệp:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.NgheNghiep,Mode=TwoWay}" Width="230" Margin="4"/>
                    <TextBlock Text="                Nơi làm việc:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.NgheNghiep,Mode=TwoWay}" Width="230" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Điện thoại:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.DienThoai,Mode=TwoWay}" Width="230" Margin="4"/>
                    <TextBlock Text="                                Email:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiCha.Email,Mode=TwoWay}" Width="230" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Họ tên mẹ:" Margin="0,7,0,0" FontWeight="Bold" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.HoTen,Mode=TwoWay}" Width="250" Margin="4"/>
                    <TextBlock Text="                                Năm sinh:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.NamSinh,Mode=TwoWay}" Width="180" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Hộ khẩu thường trú:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.HoKhauThuongTru,Mode=TwoWay}" Width="553" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Nghề nghiệp:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.NgheNghiep,Mode=TwoWay}" Width="230" Margin="4"/>
                    <TextBlock Text="                Nơi làm việc:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.NoiLamViec,Mode=TwoWay}" Width="230" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Điện thoại:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.DienThoai,Mode=TwoWay}" Width="230" Margin="4"/>
                    <TextBlock Text="                                Email:" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.NguoiMe.Email,Mode=TwoWay}" Width="230" Margin="4"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="               Tổng số anh chị em ruột (kể cả bản thân):" Margin="0,7,0,0" />
                    <TextBox Text="{Binding QuanHeGiaDinh.SoLuongAnhChiEm,Mode=TwoWay}" Width="230" Margin="4"/>
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
